package com.xlh.dao.conclude.ext;

import com.xlh.dto.conclude.ConcludeScoreDTO;
import com.xlh.pojo.conclude.ConcludeCheckSub;
import com.xlh.pojo.conclude.ConcludeScore;
import com.xlh.pojo.conclude.ConcludeStudent;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.util.List;

/**
 * @author cfz
 */
public interface ConcludeScoreMapperExt {

    /**
     * 批量插入学生分数
     * @param concludeScores
     */
    void insertBatch(@Param("concludeScores") List<ConcludeScore> concludeScores);


    /**
     * 批量考核项下关联的所有学生成绩
     * @param checkId
     */
    void deleteByCheckId(@Param("checkId") Long checkId);


    /**
     * 获取学生的平均分
     * @param subId
     * @param concludeId
     */
    BigDecimal getAvgScore(@Param("subId") Long subId,
                           @Param("concludeId")Long concludeId );


    /**
     * 根据学生编号和考核分项ID删除学生
     * @param studentNos
     * @param subIds
     */
    void deleteScoreByNosAndSubIds(@Param("studentNos") List<String> studentNos,
                                   @Param("subIds") List<Long> subIds);

    /**
     * 查询关联系统的得分
     * @param concludeStudents
     * @param concludeCheckSubs
     * @return
     */
    List<ConcludeScoreDTO> findSysScore(@Param("concludeStudents") List<ConcludeStudent> concludeStudents,
                                        @Param("concludeCheckSubs") List<ConcludeCheckSub> concludeCheckSubs);
}
